<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <script type="text/javascript">
        	function verify(field){
				if(field.value==""){
					alert("yout must input sth!");
					field.focus();
				}
			}
			function verifyfrom(form){
				var formOK=true;
				if(form.mytext.value==""){
					alert("yout must input sth!");
					form.mytext.focus();
					formOK=false;
				}
				return formOK;
			}
			function btnverifyfrom(form){
				var formOK=true;
				if(form.mytext.value==""){
					alert("yout must input sth!");
					form.mytext.focus();
					formOK=false;
				}
				if(formOK){
					form.submit();
				}
			}
        </script>
    </head>
    <body>
    	<form action="radio.html" name="myForm" onsubmit="return verifyfrom(this);">
    		<input name="mytext" onblur="verify(this);"></input>
			<input name="mytext2"></input>
			<br>
			<input type="submit" value="submit"></input><br>
			<input type="button" value="btn-submit" onclick="btnverifyfrom(this.form);"></input>
			<input type="button" value="btn-validate" onclick="this.form.action='validate.html';this.form.submit();"></input>
			<input type="image" src="../images/1.jpg" value="img" onclick="alert('img');"/>
    	</form>
    </body>
</html>
